<?php

$find=Quiz::model()->find('id=?',array($qid)); ?>
<div style="border:2px solid #a1a1a1;
padding:10px 40px; 
background:white;
border-radius:25px;
-moz-border-radius:25px; /* Firefox 3.6 and earlier */">
<?php
echo "Discription : ".$find->description;?></div>
<?php
$level=$find->no_of_level;
$limit = $find->no_of_questions;
$flag = "false";
for($i=1; $i<=$level;$i++)
{
$quiz=Questions::getList('QUIZ-ID-RAND-LIMIT',array('quizid'=>$qid,'level'=>$i,'limit'=>$limit));  

if(count($quiz)==$limit)
{
$flag="true";
?><a id='quest' href="<?php echo ApplicationConfig::getURL('', 'site', 'playQuiz',array('quizid'=>$qid,'level'=>$i)) ?>">level<?php echo $i ?></a><br>
<?php 
}

}
if($flag=="false")
echo "No Levels under this quiz/ Levels doesn't have sufficient Questions";
   
   